#pragma once

#include "includeBase.h"

#include "AppDirectory.h"
#include "models/AppSettings.h"
#include "models/FileStatus.h"
#include "models/ProjectDocument.h"
#include "models/UserSettings.h"

class AppContext
{

public:
    static QString ProductName() { return productName_; }
    static QString ProductCompany() { return productCompany_; }
    static QString ProductVersion() { return productVersion_; }
    static QString BuildNumber() { return buildNumber_; }
    static QString Copyright() { return copyright_; }

public: // Functions
    static AppSettings& appSettings() { return AppSettings::get(); }
    static AppDirectory& appDirectory() { return AppDirectory::get(); }
    static UserSettings& userSettings() { return UserSettings::get(); }
    static void close();

public:
    inline static QMainWindow* mainWindow() { return mainWindow_; }
    inline static void setMainWindow(QMainWindow* mainWindow)
    {
        mainWindow_ = mainWindow;
    }

    inline static shared_ptr<ProjectDocument> projectDocument()
    {
        return projectDocument_;
    }

    inline static void setProjectDocument(
        shared_ptr<ProjectDocument> projectDocument
    )
    {
        projectDocument_ = projectDocument;
    }

    inline static shared_ptr<FileStatus> projectDocumentStatus()
    {
        return projectDocumentStatus_;
    }

    inline static void setProjectDocumentStatus(
        shared_ptr<FileStatus> projectDocumentStatus
    )
    {
        projectDocumentStatus_ = projectDocumentStatus;
    }

private:
    static QString productName_;
    static QString productCompany_;
    static QString productVersion_;
    static QString buildNumber_;
    static QString copyright_;
    static QMainWindow* mainWindow_;
    static shared_ptr<ProjectDocument> projectDocument_;
    static shared_ptr<FileStatus> projectDocumentStatus_;
};
